package com.dys.hejiayuncommunity.common.core.exception;

/**
 * @className: com.dys.hejiayuncommunity.common.core.exception.BaseException
 * @description: 自定义异常
 * @author: pine cone
 * @version: v1.0.0
 * @createTime: 2024/12/02 22:47
 */
public class BaseException extends RuntimeException {

    /**
     * 响应错误状态码
     */
    private String code;

    /**
     * 错误描述消息
     */
    private String defaultMessage;

    public BaseException() {
    }

    public BaseException(String code, String defaultMessage) {
        super(defaultMessage);
        this.code = code;
        this.defaultMessage = defaultMessage;
    }

    public BaseException(String msg) {
        super(msg);
    }

    public String getCode() {
        return code;
    }

    public String getDefaultMessage() {
        return defaultMessage;
    }
}
